﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
/// <summary>
/// 多播委托
/// </summary>
namespace DelegateDemo3
{
    public delegate void ProgressReporter(int percentComplete);
    class X
    {
        public void InstanceProgress(int percentComplete) => Console.WriteLine(percentComplete);
    }
    class Program
    {
        static void Main(string[] args)
        {
            X x = new X();
            ProgressReporter progressReporter = x.InstanceProgress;
            progressReporter(99);
            Console.WriteLine(progressReporter.Target == x);
            Console.WriteLine(progressReporter.Method);
            Console.Read();
        }
    }
}
